#ifndef	 _FTP_H
#define	 _FTP_H	
	
#include <stdio.h>
#include <ants.h>
	
extern int get_ftp_size(struct mission *);
extern void down_ftp_init(struct mission *);
	
#define BUILD_USER(cmd, user) \
do { \
	sprintf(cmd, "USER %s\r\n", user); \
} while (0)	
	
#define BUILD_PASS(cmd, pass) \
do { \
	sprintf(cmd, "PASS %s\r\n", pass); \
} while (0)	
	
#define BUILD_SYST(cmd) \
do { \
	sprintf(cmd, "SYST\r\n"); \
} while (0)	
	
#define BUILD_PWD(cmd) \
do { \
	sprintf(cmd, "PWD\r\n"); \
} while (0)	
	
#define BUILD_TYPE(cmd) \
do { \
	sprintf(cmd, "TYPE I\r\n"); \
} while (0)	
	
#define BUILD_PASV(cmd) \
do { \
	sprintf(cmd, "PASV\r\n"); \
} while (0)	
	
#define BUILD_SIZE(cmd, path) \
do { \
	sprintf(cmd, "SIZE %s\r\n", path); \
} while (0)	
	
#define BUILD_MDTM(cmd, path) \
do { \
	sprintf(cmd, "MDTM %s\r\n", path); \
} while (0)	
	
#define BUILD_RETR(cmd, path) \
do { \
	sprintf(cmd, "RETR %s\r\n", path); \
} while (0)	
	
#define BUILD_REST(cmd, size) \
do { \
	sprintf(cmd, "REST %d\r\n", size); \
} while (0)	
	
#endif	
